package com.lhj.springboot.ssm.controller;

import com.lhj.springboot.ssm.bean.TUser;
import com.lhj.springboot.ssm.mapper.TUserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description
 * @Author lhj
 * @Date 2024/6/23 10:58
 */
@RestController
public class UserController {
    
    @Autowired
    private TUserMapper tUserMapper;
    
    @GetMapping("/queryUser/{id}")
    public ResponseEntity<?> queryUser(@PathVariable Long id){
        TUser user =  tUserMapper.queryUser(id);
        return ResponseEntity.ok(user);
    }
    
}
